﻿using System.Collections;
using UnityEngine;
using UnityEngine.UI;

public class Hello
{
    public static void Run()
    {
        Debug.Log("Hello, World!");

        var btn1Go = GameObject.Find("Canvas/BtnOne");
        if (btn1Go != null)
        {
            var btn1 = btn1Go.GetComponent<Button>();
            btn1.onClick.AddListener(ClickOne);
        }

        //注释掉
        var btn2Go = GameObject.Find("Canvas/BtnTwo");
        if (btn2Go != null)
        {
            var btn2 = btn2Go.GetComponent<Button>();
            btn2.onClick.AddListener(ClickTwo);
        }
    }

    private static void ClickOne()
    {
        PrintTest.PrintOne();
    }

    //注释掉
    private static void ClickTwo()
    {
        //比如这个就是被干掉的SDK接口
        PrintTest.PrintTwo();
    }
}